package com.xy.biz.ts.domain.enums;

import com.xy.lang.domain.KeyValue;
import com.xy.lang.enums.CodeEnum;

/**
 * @author Greekn Zhang
 * @date 2021/12/1 14:47
 * @description
 */
public enum ExaminationQuestionTypeEnum implements CodeEnum {
    SINGLE_CHOICE(1, "单选题"),
    MULTIPLE_CHOICE(2, "多选题"),
    TRUE_OR_FALSE(3, "判断题"),
    COMPLETION(4, "填空题"),
    SHORT_ANSWER(5, "简答题"),
    PICTURE_SINGLE_CHOICE(6, "图片单选题"),
    PICTURE_WITHIN_A_YEAR(7, "图片多选题");

    private int code;
    private String name;

    ExaminationQuestionTypeEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public KeyValue<Integer, String> toKeyValue() {
        return new KeyValue<>(this.code, this.name);
    }
}
